package com.soul.admin.service;

import com.soul.admin.mapper.LogMapper;
import com.soul.model.db.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class LogService {

    @Autowired
    private LogMapper logMapper;

    /**
     * 添加log日志
     * @param log
     */
    public void add(Log log) {
        log.setCreated(new Date());
        logMapper.insert(log);
    }
}